// Do file that conducts the analyses of the relationship bw birth order and 
// voting in the Swedish sample

capture log close
log using "C:\Userdata\Shared\Logs\SiblingOrder\ReplicationSweden.log", text replace 

// Load the birth order data
	
	set matsize 10000
	
	use "D:\Data\ProjData\SiblingOrder\ReplicationSwedishData 191129.dta", clear

// Drop a few observations for which birth order is higher than number of children
	bysort LopNrMor Ar: egen maxMorOrdNr = max(MorOrdNr)
	drop if maxMorOrdNr > MorAntBarn & maxMorOrdNr <. 
	
// Create indicator that records whether the mother have adopted any children
	bysort LopNrMor: egen FamAdopterad = max(Adopterad)

// Create female indicator	
	gen Kvinna = Kon-1

// Create indicators for youngest and oldest birthyear among siblings within family
	bysort LopNrMor: egen FodArMin = min(FodAr)
	bysort LopNrMor: egen FodArMax = max(FodAr)
	 
	bysort LopNrMor Ar: egen sMorAntBarn = count(LopNr)
 
 
// Recode percentile to 0-100
  replace pLoneInk0709 = pLoneInk0709*100
  replace pLoneInk0608 = pLoneInk0608*100
  replace pUtbAr10 = pUtbAr10*100
  replace pUtbAr09 = pUtbAr09*100
	
  listwise MorAntBarn FodAr MorFodAr FarFodAr MorOrdNr LopNrMor	
  
  local sample2010 "inrange(FodAr, 1945, 1990) & FodArMin>=1945 & FodArMax<=1990 & UtlSvBakG == 22 & inrange(MorAntBarn, 2, 5) & FamTvilling != 1 & FamAdopterad !=1 & Ar==2010"
  local sample2009 "inrange(FodAr, 1944, 1989) & FodArMin>=1944 & FodArMax<=1989 & UtlSvBakG == 22 & inrange(MorAntBarn, 2, 5) & FamTvilling != 1 & FamAdopterad !=1 & Ar==2009"

  sum RostRI if `sample2010' & MorOrdNr == 1
  sum RostRI if `sample2010' & MorOrdNr == 2
  sum RostRI if `sample2010' & MorOrdNr == 3
  sum RostRI if `sample2010' & MorOrdNr == 4
  sum RostRI if `sample2010' & MorOrdNr == 5
  
  sum RostEU if `sample2009' & MorOrdNr == 1
  sum RostEU if `sample2009' & MorOrdNr == 2
  sum RostEU if `sample2009' & MorOrdNr == 3
  sum RostEU if `sample2009' & MorOrdNr == 4
  sum RostEU if `sample2009' & MorOrdNr == 5
 
// Within family estimates in 2010 
  
  reghdfe RostRI i.MorOrdNr Kvinna i.FodAr if `sample2010', absorb(LopNrMor) cluster(LopNrMor) 
  eststo M1
  estadd ysumm
  
  esttab M1, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child") 
	
	
// Within family estimates in 2009 
  local sample2009 "inrange(FodAr, 1944, 1989) & FodArMin>=1944 & FodArMax<=1989 & UtlSvBakG == 22 & inrange(MorAntBarn, 2, 5) & FamTvilling != 1 & FamAdopterad !=1 & Ar==2009"
  
  reghdfe RostEU i.MorOrdNr Kvinna i.FodAr if `sample2009', absorb(LopNrMor) cluster(LopNrMor)  
  eststo Q1
  estadd ysumm
  
  esttab Q1, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child") 

			

// Within family estimates in 2010 without age restrictions
  local sample2010age "UtlSvBakG == 22 & inrange(MorAntBarn, 2, 5) & FamTvilling != 1 & FamAdopterad !=1 & Ar==2010"
  local sample2009age "UtlSvBakG == 22 & inrange(MorAntBarn, 2, 5) & FamTvilling != 1 & FamAdopterad !=1 & Ar==2009"

  reghdfe RostRI i.MorOrdNr Kvinna i.FodAr if `sample2010age', absorb(LopNrMor) cluster(LopNrMor) 
  eststo M1
  estadd ysumm
  
  esttab M1, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child") 
			
// Between and within family estimates in 2009 without age restrictions
  reghdfe RostEU i.MorOrdNr Kvinna i.FodAr if `sample2009age', absorb(LopNrMor) cluster(LopNrMor)  
  eststo Q1
  estadd ysumm
  
  esttab Q1, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child")			

			
			
// Results by gender	
  // Within family estimates in 2010, men 
  reghdfe RostRI i.MorOrdNr Kvinna i.FodAr if `sample2010' & Kvinna == 0, absorb(LopNrMor) cluster(LopNrMor)  
  eststo M1
  estadd ysumm
  
  esttab M1, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child") 
			
// Within family estimates in 2009, men 
  reghdfe RostEU i.MorOrdNr Kvinna i.FodAr if `sample2009' & Kvinna == 0, absorb(LopNrMor) cluster(LopNrMor)  
  eststo Q1
  estadd ysumm
  
  esttab Q1, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child") 

  // Within family estimates in 2010, women 
  reghdfe RostRI i.MorOrdNr Kvinna i.FodAr if `sample2010' & Kvinna == 1, absorb(LopNrMor) cluster(LopNrMor)  
  eststo M1
  estadd ysumm
  
  esttab M1, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child") 
			
// Within family estimates in 2009, women 
  reghdfe RostEU i.MorOrdNr Kvinna i.FodAr if `sample2009' & Kvinna == 1, absorb(LopNrMor) cluster(LopNrMor)  
  eststo Q1
  estadd ysumm
  
  esttab Q1, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child") 

	
// Include only individuals with parents who never divorced parents and whose parents have the same number and order of children
  
// Within family estimates in 2010 
  reghdfe RostRI i.MorOrdNr Kvinna i.FodAr if `sample2010' & (SkildFar == 0 & SkildMor == 0) & (MorOrdNr == FarOrdNr), absorb(LopNrMor) cluster(LopNrMor)  
  eststo M1
  estadd ysumm
  
  esttab M1, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child") 
			
// Within family estimates in 2009 
  reghdfe RostEU i.MorOrdNr Kvinna i.FodAr if `sample2009' & (SkildFar == 0 & SkildMor == 0) & (MorOrdNr == FarOrdNr), absorb(LopNrMor) cluster(LopNrMor)  
  eststo Q1
  estadd ysumm
  
  esttab Q1, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child") 		
 		
			
// Birth order effects by family size on turnout in 2010,  
	eststo clear 
	eststo: quietly reghdfe RostRI i.MorOrdNr i.FodAr Kvinna if `sample2010', absorb(LopNrMor) cluster(LopNrMor) 
	estadd ysumm
	eststo: quietly reghdfe RostRI i.MorOrdNr i.FodAr Kvinna if `sample2010' & MorAntBarn==2, absorb(LopNrMor) cluster(LopNrMor) 
	estadd ysumm
	eststo: quietly reghdfe RostRI i.MorOrdNr i.FodAr Kvinna if `sample2010' & MorAntBarn==3, absorb(LopNrMor) cluster(LopNrMor) 
	estadd ysumm
	eststo: quietly reghdfe RostRI i.MorOrdNr i.FodAr Kvinna if `sample2010' & MorAntBarn==4, absorb(LopNrMor) cluster(LopNrMor) 
	estadd ysumm
	eststo: quietly reghdfe RostRI i.MorOrdNr i.FodAr Kvinna if `sample2010' & MorAntBarn==5, absorb(LopNrMor) cluster(LopNrMor) 
	estadd ysumm
	
	esttab, keep(*.MorOrdNr) stats(ymean N ar2) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child")
			
	
	eststo clear
	
// Birth order effects by family size on turnout in 2009,  
	local sample "inrange(FodAr, 1945, 1990) & UtlSvBakG == 22 & inrange(MorAntBarn, 2, 5) & FamTvilling != 1 & FamAdopterad !=1 & Ar==2010"

	eststo clear 
	eststo: qui reghdfe RostEU i.MorOrdNr i.FodAr Kvinna if `sample2009', absorb(LopNrMor) cluster(LopNrMor) 
	estadd ysumm
	eststo: qui reghdfe RostEU i.MorOrdNr i.FodAr Kvinna if `sample2009' & MorAntBarn==2, absorb(LopNrMor) cluster(LopNrMor) 
	estadd ysumm
	eststo: qui reghdfe RostEU i.MorOrdNr i.FodAr Kvinna if `sample2009' & MorAntBarn==3, absorb(LopNrMor) cluster(LopNrMor) 
	estadd ysumm
	eststo: qui reghdfe RostEU i.MorOrdNr i.FodAr Kvinna if `sample2009' & MorAntBarn==4, absorb(LopNrMor) cluster(LopNrMor) 
	estadd ysumm
	eststo: qui reghdfe RostEU i.MorOrdNr i.FodAr Kvinna if `sample2009' & MorAntBarn==5, absorb(LopNrMor) cluster(LopNrMor) 
	estadd ysumm
	
	esttab, keep(*.MorOrdNr)  stats(ymean N ar2) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child")

			
// Mediation results
  local sample2010med "inrange(FodAr, 1945, 1990) & pLoneInk0709!=. & pUtbAr10!=. & FodArMin>=1945 & FodArMax<=1990 & UtlSvBakG == 22 & inrange(MorAntBarn, 2, 5) & FamTvilling != 1 & FamAdopterad !=1 & Ar==2010"
  local sample2009med "inrange(FodAr, 1944, 1989) & pLoneInk0608!=. & pUtbAr09!=.  & FodArMin>=1944 & FodArMax<=1989 & UtlSvBakG == 22 & inrange(MorAntBarn, 2, 5) & FamTvilling != 1 & FamAdopterad !=1 & Ar==2009"
 
// Within family estimates in 2010 
  reghdfe RostRI i.MorOrdNr i.FodAr Kvinna if `sample2010med', absorb(LopNrMor) cluster(LopNrMor)  
  eststo M1
  estadd ysumm
  
  reghdfe RostRI i.MorOrdNr Kvinna i.FodAr pLoneInk0709 pUtbAr10 if `sample2010med', absorb(LopNrMor) cluster(LopNrMor)  
  eststo M2
  estadd ysumm 
  
  esttab M1 M2, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child") 
			
// Within family estimates in 2009 
  reghdfe RostEU i.MorOrdNr i.FodAr Kvinna if `sample2009med', absorb(LopNrMor) cluster(LopNrMor) 
  eststo Q1
  estadd ysumm
  
  reghdfe RostEU i.MorOrdNr Kvinna pLoneInk0608 i.FodAr pUtbAr09 if `sample2009med', absorb(LopNrMor) cluster(LopNrMor) 
  eststo Q2
  estadd ysumm
  
  esttab Q1 Q2, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child") 



// Conditional logit estimates
 clogit RostRI i.MorOrdNr i.FodAr Kvinna if `sample2010', group(LopNrMor) cluster(LopNrMor)
 margins, dydx(MorOrdNr*) predict(pu0)
 
 clogit RostEU i.MorOrdNr i.FodAr Kvinna if `sample2009', group(LopNrMor) cluster(LopNrMor)
 margins, dydx(MorOrdNr*) predict(pu0)

 
 
 
 // Generate dummy for being firstborn
  gen MorOrdNrDum = 1 if MorOrdNr==1
  replace MorOrdNrDum = 0 if inrange(MorOrdNr, 2, 18)
  
  
// Between and within family estimates in 2009 and 2010 using dummy for firstborn

  reghdfe RostEU i.MorOrdNrDum Kvinna if `sample2009', absorb(FodAr) cluster(LopNrMor) 
  eststo M1
  estadd ysumm
  reghdfe RostEU i.MorOrdNrDum i.FodAr Kvinna if `sample2009', absorb(LopNrMor) cluster(LopNrMor) 
  eststo M2
  estadd ysumm

  reghdfe RostRI i.MorOrdNrDum Kvinna if `sample2010', absorb(FodAr) cluster(LopNrMor) 
  eststo M3
  estadd ysumm
  reghdfe RostRI i.MorOrdNrDum i.FodAr Kvinna if `sample2010', absorb(LopNrMor) cluster(LopNrMor) 
  eststo M4
  estadd ysumm
  
  esttab M1 M2 M3 M4, keep(*MorOrdNrDum) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(1.MorOrdNr "Later born")

			
// Within family estimates: spacing(age differences in two-children families
preserve

keep if MorAntBarn==2

  local sample2010 "inrange(FodAr, 1945, 1990) & FodArMin>=1945 & FodArMax<=1990 & UtlSvBakG == 22 & inrange(MorAntBarn, 2, 5) & FamTvilling != 1 & FamAdopterad !=1 & Ar==2010"
  local sample2009 "inrange(FodAr, 1944, 1989) & FodArMin>=1944 & FodArMax<=1989 & UtlSvBakG == 22 & inrange(MorAntBarn, 2, 5) & FamTvilling != 1 & FamAdopterad !=1 & Ar==2009"

bysort LopNrMor: egen occmax = max(FodAr) if `sample2010'
bysort LopNrMor: egen occmin = min(FodAr) if `sample2010'
gen Avstand2010 = occmax-occmin
drop occ*

tab Avstand2010

sum Avstand2010, detail

gen byte Over2010 = Avstand2010>r(p50)

tab Over2010

bysort LopNrMor: egen occmax = max(FodAr) if `sample2009'
bysort LopNrMor: egen occmin = min(FodAr) if `sample2009'
gen Avstand2009 = occmax-occmin
drop occ*

tab Avstand2009

sum Avstand2009, detail

gen byte Over2009 = Avstand2009>r(p50)

tab Over2009

  listwise MorAntBarn FodAr MorFodAr FarFodAr MorOrdNr LopNrMor	

replace MorOrdNr = MorOrdNr-1  

// Within family estimates in 2010 
  reghdfe RostRI MorOrdNr i.FodAr Kvinna if `sample2010', absorb(LopNrMor) cluster(LopNrMor)
  eststo clear
  eststo M1
  estadd ysumm
  reghdfe RostRI MorOrdNr i.FodAr Kvinna if `sample2010' & Over2010==0, absorb(LopNrMor) cluster(LopNrMor)
  eststo M2
  estadd ysumm
  reghdfe RostRI MorOrdNr i.FodAr Kvinna if `sample2010' & Over2010==1, absorb(LopNrMor) cluster(LopNrMor) 
  eststo M3
  estadd ysumm
  
  esttab M1 M2 M3, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child")

  reghdfe RostRI c.Over2010##(c.MorOrdNr c.Kvinna i.FodAr) if `sample2010', absorb(LopNrMor) cluster(LopNrMor)
  
  
// Between and within family estimates in 2009 
  reghdfe RostEU MorOrdNr Kvinna i.FodAr if `sample2009', absorb(LopNrMor) cluster(LopNrMor) 
  eststo clear
  eststo Q1
  estadd ysumm
  reghdfe RostEU MorOrdNr i.FodAr Kvinna if `sample2009' & Over2009==0, absorb(LopNrMor) cluster(LopNrMor) 
  eststo Q2
  estadd ysumm
  reghdfe RostEU MorOrdNr i.FodAr Kvinna if `sample2009' & Over2009==1, absorb(LopNrMor) cluster(LopNrMor) 
  eststo Q3
  estadd ysumm
  
  esttab Q1 Q2 Q3, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child")  

  reghdfe RostEU c.Over2009##(c.MorOrdNr c.Kvinna i.FodAr) if `sample2009', absorb(LopNrMor) cluster(LopNrMor)
			
restore
			

// Heterogeneity across parental education
*ForHS1= one parent some college, ForHS2= both parents some college
gen ForHS = 0
replace ForHS = 1 if inrange(MorUtbAr, 13, 19) & inrange(FarUtbAr, 13, 19)
replace ForHS = . if MorUtbAr==. | FarUtbAr==.


  local sample2010 "inrange(FodAr, 1945, 1990) & FodArMin>=1945 & FodArMax<=1990 & UtlSvBakG == 22 & inrange(MorAntBarn, 2, 5) & FamTvilling != 1 & FamAdopterad !=1 & Ar==2010"
  local sample2009 "inrange(FodAr, 1944, 1989) & FodArMin>=1944 & FodArMax<=1989 & UtlSvBakG == 22 & inrange(MorAntBarn, 2, 5) & FamTvilling != 1 & FamAdopterad !=1 & Ar==2009"

  listwise MorAntBarn FodAr MorFodAr FarFodAr MorOrdNr LopNrMor	
  

// Within family estimates in 2010
  reghdfe RostRI i.MorOrdNr i.FodAr Kvinna if `sample2010' & ForHS!=., absorb(LopNrMor) cluster(LopNrMor)
  eststo clear
  eststo M1
  estadd ysumm
  reghdfe RostRI i.MorOrdNr i.FodAr Kvinna if `sample2010' & ForHS==0., absorb(LopNrMor) cluster(LopNrMor)
  eststo M2
  estadd ysumm
  reghdfe RostRI i.MorOrdNr i.FodAr Kvinna if `sample2010' & ForHS==1., absorb(LopNrMor) cluster(LopNrMor)
  eststo M3
  estadd ysumm
  
  esttab M1 M2 M3, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child")

			
// Interactions
  reghdfe RostRI i.ForHS##(i.MorOrdNr i.FodAr i.Kvinna) if `sample2010', absorb(LopNrMor) cluster(LopNrMor)
  eststo clear
  eststo M1
  estadd ysumm
  
  testparm 1.ForHS#i.MorOrdNr
  
  esttab M1, keep(*MorOrdNr 1.ForHS#*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)
			
  
// Within family estimates in 2009
  reghdfe RostEU i.MorOrdNr i.FodAr Kvinna if `sample2009' & ForHS!=., absorb(LopNrMor) cluster(LopNrMor)
  eststo clear
  eststo Q1
  estadd ysumm
  reghdfe RostEU i.MorOrdNr i.FodAr Kvinna if `sample2009' & ForHS==0., absorb(LopNrMor) cluster(LopNrMor)
  eststo Q2
  estadd ysumm
  reghdfe RostEU i.MorOrdNr i.FodAr Kvinna if `sample2009' & ForHS==1., absorb(LopNrMor) cluster(LopNrMor)
  eststo Q3
  estadd ysumm
  
  esttab Q1 Q2 Q3, keep(*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child")
			

// Interactions
  reghdfe RostEU i.ForHS##(i.MorOrdNr i.FodAr i.Kvinna) if `sample2009', absorb(LopNrMor) cluster(LopNrMor)
  eststo clear
  eststo Q1
  estadd ysumm
  
  testparm 1.ForHS#i.MorOrdNr
  
  esttab Q1, keep(*MorOrdNr 1.ForHS#*MorOrdNr) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)
			
			

// Compare sibling order effect to effect of education defined as completed college education (at least 2 years of post upper secondary schooling)
  egen UtbAr = rowmax(UtbAr09 UtbAr10)
  gen PostGymn = 0 if inrange(UtbAr, 7, 13)
  replace PostGymn = 1 if inrange(UtbAr, 14, 19)

  local sample2010 "inrange(FodAr, 1945, 1990) & FodArMin>=1945 & FodArMax<=1990 & MorUtbAr!=. & UtlSvBakG == 22 & inrange(MorAntBarn, 2, 5) & FamTvilling != 1 & FamAdopterad !=1 & Ar==2010 & PostGymn!=. & MorOrdNr!=."
  local sample2009 "inrange(FodAr, 1944, 1989) & FodArMin>=1944 & FodArMax<=1989 & MorUtbAr!=. & UtlSvBakG == 22 & inrange(MorAntBarn, 2, 5) & FamTvilling != 1 & FamAdopterad !=1 & Ar==2009 & PostGymn!=. & MorOrdNr!=."

  reghdfe RostEU PostGymn Kvinna i.FodAr if `sample2009', absorb(LopNrMor) cluster(LopNrMor) 
  eststo M1
  estadd ysumm
  reghdfe RostRI PostGymn Kvinna i.FodAr if `sample2010', absorb(LopNrMor) cluster(LopNrMor) 
  eststo M2
  estadd ysumm
  
  esttab M1 M2, keep(PostGymn) star(* .1 ** .05 *** .001) stats(ymean N) b(3) se(3)  ///
			coeflabels(2.MorOrdNr "Second child" 3.MorOrdNr "Third child" 4.MorOrdNr "Fourth child" 5.MorOrdNr "Fifth child" 1.PostGymn "College")
  
  log close
  
  